<%@include file="init.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <%@include file="head.jsp" %>
        <script type="text/javascript" src="js/jquery_1.js" language="JavaScript"></script>
        <script type="text/javascript" src="js/ajax.js" language="JavaScript"></script>
    </head>
    <body>
        <div id="page">
            <%@include file="menu.jsp" %>

            <div id="main-content">
                <h3>Gestionar entradas</h3>
                <table class="tablaGris">
                    <tr>
                        <th>Usuario</th>
                        <th>Combate</th>
                        <th>Estadio</th>
                        <th>Fecha</th>
                        <th>Modificar</th>
                        <th>Eliminar</th>
                    </tr>
                    <logic:notEmpty name="GestionEntradasForm" property="listadoEntradas">
                        <logic:iterate name="GestionEntradasForm" property="listadoEntradas" id="entrada">
                            <tr id="${entrada.idEntrada}">
                                <td>
                                    <bean:write name="entrada" property="usuario"/>
                                </td>
                                <td>
                                    <bean:write name="entrada" property="nombreBoxeador1"/> <bean:write name="entrada" property="apellidosBoxeador1"/>
                                    vs 
                                    <bean:write name="entrada" property="nombreBoxeador2"/> <bean:write name="entrada" property="apellidosBoxeador2"/>
                                </td>
                                <td>
                                    <bean:write name="entrada" property="nombreEstadio"/>
                                </td>
                                <td>
                                    <bean:write name="entrada" property="fecha"/>
                                </td>
                                <td>
                                    <html:link action="VerEntradaGestion.do?idEntrada=${entrada.idEntrada}" >
                                        <html:img src="images/modificar.png" alt="modificar" style="margin-left:15px;width:30px;" />
                                    </html:link>
                                </td>
                                <td>
                                    <html:img src="images/borrar.jpg" alt="borrar" style="margin-left:15px;width:30px;" onclick="borrarEntrada(${entrada.idEntrada});"/>
                                </td>
                            </tr>
                        </logic:iterate>
                    </logic:notEmpty>
                </table> 
            </div>
        </div>
    </body>
</html>
